import { createRouter, createWebHashHistory } from "vue-router";
// 首页
const Home = () => import("../views/home/index");
// 学习中心
const LearningCenter = () => import("../views/learningCenter/index");
// 资讯
const Information = () => import("../views/information/index");
// 烤题库
const ExamStoreroom = () => import("../views/examStoreroom/index");
// 我的
const User = () => import("../views/user/index");
//登录页面
const UserLogin = () => import("../views/user/component/UserLogin");

// 非首屏navtab页面
// 系统页面
const SystemClass = () => import("../views/otherPage2/systemClass/index");
// 公开页面
const OpenClass = () => import("../views/otherPage2/openClass/index");
// 我的资料
const ProfileMe = () => import("../views/otherPage2/profileMe/index");
// 我的资料--压缩包页面--三级
const ProfileZipPage = () =>
  import("../views/otherPage2/profileMe/profileZipPage/index");
// 历年真题
const OverTopic = () => import("../views/otherPage2/overTopic/index");
// 试卷简介--三级
const TestIntro = () => import("../views/otherPage3/testIntro/index");
// 答题页面--三级
const AnswerPage = () => import("../views/otherPage3/answerPage/index");

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/learningCenter",
    name: "LearningCenter",
    component: LearningCenter,
  },
  {
    path: "/information",
    name: "Information",
    component: Information,
  },
  {
    path: "/examStoreroom",
    name: "ExamStoreroom",
    component: ExamStoreroom,
  },
  {
    path: "/user",
    name: "User",
    component: User,
  },
  {
    path: "/user/login",
    name: "UserLogin",
    component: UserLogin,
  },
  // 2|3
  {
    path: "/systemClass",
    name: "SystemClass",
    component: SystemClass,
  },
  {
    path: "/openClass",
    name: "OpenClass",
    component: OpenClass,
  },
  {
    path: "/profileMe",
    name: "ProfileMe",
    component: ProfileMe,
  },
  {
    path: "/profileMe/:id",
    name: "ProfileZipPage",
    component: ProfileZipPage,
  },
  {
    path: "/overTopic",
    name: "OverTopic",
    component: OverTopic,
  },
  {
    path: "/overTopic/:id",
    name: "TestIntro",
    component: TestIntro,
  },
  {
    path: "/answerPage/:id",
    name: "AnswerPage",
    component: AnswerPage,
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
